package com.skytech.component.crawler.scratch;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import java.util.List;
import java.util.Map;


public interface TaskStatusDAO extends JpaRepository<TaskStatus,String> {

        List<TaskStatus>  findAllByRuleId(String ruleId);


       List<TaskStatus> findAllByStatus(String status);


        @Query(value = "select count(*) from task_status u where u.status=:status group by u.status",nativeQuery = true)
        Integer findGroupByStatus(@Param("status") String status);
}
